<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        section{
            width: 400px;
            height: 400px;
            position: fixed;
            top: 0;right: 0;bottom: 0;left: 0;
            margin: auto;
            transform-style: preserve-3d;
            transform: rotate3d(1,1,0,30deg);
            animation: mydh 30s linear infinite;
        }
        section div{
            width: 400px;
            height: 400px;
            position: absolute;
            transition: 3s;
            opacity: 0.5;
        }
        div:nth-child(1){
            background: url(https://img1.baidu.com/it/u=1955269946,2491812537&fm=253&fmt=auto&app=138&f=JPEG?w=640&h=358) no-repeat;
            background-size:100% 100%;
        }
        div:nth-child(2){
            background: url(https://img1.baidu.com/it/u=2159965812,1013222512&fm=253&fmt=auto&app=138&f=JPEG?w=450&h=315) no-repeat;
            background-size:100% 100%;
        }
        div:nth-child(3){
           background: url(https://img2.baidu.com/it/u=2284249664,782824507&fm=253&fmt=auto&app=120&f=JPEG?w=700&h=438) no-repeat;
           background-size: 100% 100%;
        }
        div:nth-child(4){
            background: url(https://img1.baidu.com/it/u=3431219533,2032792812&fm=26&fmt=auto) no-repeat;
           background-size: 100% 100%;
        }
        div:nth-child(5){
            background: url(https://img1.baidu.com/it/u=1043313470,2874180669&fm=253&fmt=auto&app=138&f=JPG?w=889&h=500) no-repeat;
           background-size: 100% 100%;
        }
        div:nth-child(6){
            background: url(https://img0.baidu.com/it/u=1800756766,107262178&fm=253&fmt=auto&app=138&f=JPEG?w=720&h=450) no-repeat;
           background-size: 100% 100%;
        }
        div:nth-child(1){
            transform: translateX(200px) rotateY(90deg);
        }
        div:nth-child(2){
            transform: translateX(-200px) rotateY(90deg);
        }
        div:nth-child(3){
            transform: translateY(200px) rotateX(-90deg);
        }
        div:nth-child(4){
            transform: translateY(-200px) rotateX(-90deg);
        }
        div:nth-child(5){
            transform: translateZ(200px);
        }
        div:nth-child(6){
            transform: translateZ(-200px);
        }

        section:hover div:nth-child(1){
            transform: translateX(400px) rotateY(90deg);
        }
        section:hover div:nth-child(2){
            transform: translateX(-400px) rotateY(90deg);
        }
        section:hover div:nth-child(3){
            transform: translateY(400px) rotateX(-90deg);
        }
        section:hover div:nth-child(4){
            transform: translateY(-400px) rotateX(-90deg);
        }
        section:hover div:nth-child(5){
            transform: translateZ(400px);
        }
        section:hover div:nth-child(6){
            transform: translateZ(-400px);
        }

        @keyframes mydh{
            0%{transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg)}
            10%{transform: rotateX(60deg) rotateY(60deg) rotateZ(60deg)}
            20%{transform: rotateX(90deg) rotateY(90deg) rotateZ(90deg)}
            30%{transform: rotateX(180deg) rotateY(180deg) rotateZ(180deg)}
            40%{transform: rotateX(270deg) rotateY(270deg) rotateZ(270deg)}
            50%{transform: rotateX(360deg) rotateY(360deg) rotateZ(360deg)}
            60%{transform: rotateX(270deg) rotateY(270deg) rotateZ(270deg)}
            70%{transform: rotateX(180deg) rotateY(180deg) rotateZ(180deg)}
            80%{transform: rotateX(90deg) rotateY(90deg) rotateZ(90deg)}
            90%{transform: rotateX(60deg) rotateY(60deg) rotateZ(60deg)}
            100%{transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg)}
        }
    </style>
</head>
<body>
    <section>
        <div></div>
        <div></div>
        <div></div>
        <div></div>
        <div></div>
        <div></div>
    </section>
</body>
</html>